///THIS IS FOR JAVASCRIPT ONLY USED IN CANVAS VIEW